<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>绝对定位</title>
  <style>
    .fu
    {
      background-color: #ff0;
    }
    .fu>div
    {
      width: 100px;
      height: 100px;
    }
    .z1
    {
      background-color: red;
        position: relative;
        left: 50px;
        z-index: 3;
    }
    .z2
    {
        /*固定定位  相对位置一直是html 会脱离文档流 释放空间布局*/
        background-color: blue;
        position: fixed;
        top: 0;
        left: 0;
        z-index: 1;
    }
    .z3
    {
        background-color: green;
    }
  </style>
</head>
<body>
<div class="fu">
  <div class="z1"></div>
  <div class="z2"></div>
  <div class="z3"></div>
</div>
</body>
</html>